package com.e3.basdoc.employeecls.client;

import java.util.ArrayList;
import java.util.List;

import com.e3.basdoc.employeecls.model.EmployeeClsModel;
import com.e3.template.tgf.TGFSimpleFormPanel;
import com.extjs.gxt.ui.client.widget.form.Field;

public class EmployeeClsFormPanel extends TGFSimpleFormPanel<EmployeeClsModel> {

	@Override
	public List<Field<?>> getFormFields() {
		String[] fNames = {EmployeeClsModel.ID
				,EmployeeClsModel.CODE
				,EmployeeClsModel.NAME
				,EmployeeClsModel.REMARK};
		List<Field<?>> fields = new ArrayList<Field<?>>(fNames.length);
		for (String fName : fNames) {
			Field<?> field = EmployeeClsHelper.INSTANCE.createFormField(fName);
			fields.add(field);
		}
		
		return fields;
	}

	@Override
	public EmployeeClsModel createModelInstance() {
		return new EmployeeClsModel();
	}

	@Override
	public int getLabelWidth() {
		return 100;
	}

}
